package com.zhang.zhangapp.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Administrator on 2018/4/2.
 */

public class AdvData implements Parcelable{
    private String site;
    private String title;
    private List<ZFile> attachment;

    protected AdvData(Parcel in) {
        site = in.readString();
        title = in.readString();
        attachment = in.createTypedArrayList(ZFile.CREATOR);
    }


    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<ZFile> getAttachment() {
        return attachment;
    }

    public void setAttachment(List<ZFile> attachment) {
        this.attachment = attachment;
    }

    public static final Creator<AdvData> CREATOR = new Creator<AdvData>() {
        @Override
        public AdvData createFromParcel(Parcel in) {
            return new AdvData(in);
        }

        @Override
        public AdvData[] newArray(int size) {
            return new AdvData[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(site);
        parcel.writeString(title);
        parcel.writeTypedList(attachment);
    }
}
